*************************************************
*Do File for "Birds of a Feather"				*
*Foreign Policy Analysis						*
*Last Revised: January 2021						*
*By Bryan R. Early, University at Albany,SUNY	*
*Contact: bearly@albany.edu						*
*************************************************

 /*
 
  There are two distinct data sets and analyses employed in "Birds of a Feather." This do file and dataset is for the analysis on sanctions-busting trade, 
  which corresponds to Table 2 in the main text. Use "Birds of a Feather - Sanctions Busting Analysis - Data Set.dta" 

  In order to run this analysis, the user-created ado files for Firth's Logit and Rare Events Logit are required. They are accessible the following ways:

  *Firth's Logit: This package can be installed directly from STATA with the following STATA command:
  net install firthlogit.pkg

  *Rare Events Logit: This package is available via manual download from Gary King's website located here: https://gking.harvard.edu/relogit 
  Users can download the zip file and then copy and paste the commands into their STATA ado folder.

*/


**Table 2: Analyzing the Determinants of Extensive Trade-Based Sanctions Busting**

eststo M1: logit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., robust
eststo M2: relogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
eststo M3: firthlogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
esttab M1 M2 M3,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)

**Appendix Table A1: Summary Statistics for the Sanctions Busting Analyses’ Variables**

summ AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust

**Appendix Table A2: Correlation Matrix for the Sanctions Busting Analyses’ Variables**
corr AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust


**Appendix Table A3: Analyzing the Determinants of Extensive Trade-Based Sanctions Busting Using a Constrained Model**

eststo M4: logit AllBusters 	 PartUSSanct	lnlaggdpP lndist  Neighbor lnlaggdpT  NoBust NoBust_sq NoBust_cb if  tradeTP!=., robust
eststo M5: relogit AllBusters 	 PartUSSanct	lnlaggdpP lndist  Neighbor lnlaggdpT   NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
eststo M6: firthlogit AllBusters PartUSSanct	lnlaggdpP lndist  Neighbor lnlaggdpT  NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
esttab M4 M5 M6,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)

**Appendix Table A4: Analyzing the Determinants of Extensive Trade-Based Sanctions Busting Without the Top-5 Leading Sanctions Busters**
eststo M7: logit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=. & TopBuster!=1, robust
eststo M8: relogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=. & TopBuster!=1, 
eststo M9: firthlogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=. & TopBuster!=1, 
esttab M7 M8 M9,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)

**Appendix Table A5: Analyzing the Determinants of Extensive Trade-Based Sanctions Busting in First 3 Years (Models 1-2) vs. After 3 Years (Models 3-4)**

eststo M10: relogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct NoBust NoBust_sq NoBust_cb if  tradeTP!=. & duration<=3 
eststo M11: firthlogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct NoBust NoBust_sq NoBust_cb if  tradeTP!=. & duration<=3 
eststo M12: relogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct  NoBust NoBust_sq NoBust_cb if  tradeTP!=. & duration>3
eststo M13: firthlogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct NoBust NoBust_sq NoBust_cb if  tradeTP!=. & duration>3
esttab M10 M11 M12 M13,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


**Appendix Table A6: Analyzing the Determinants of Extensive Trade-Based Sanctions Busting with Only Severe Sanctions Episodes**

eststo M14: logit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct partnerSevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., robust
eststo M15: relogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct partnerSevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
eststo M16: firthlogit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct partnerSevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., 
esttab M14 M15 M16,  se(2) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)


**Calculating the Observed Effects of U.S. Sanctions on Third Parties**
 /* Note: Make sure to clear the results after running these observed value predictions** */

logit AllBusters PartUSSanct	lnlaggdpP lagtradeopenP lagtradesharePT  DP_I DP_II DP_III     JD_I JD_II JD_III lndist  Neighbor lnlaggdpT  SevSanct duration  NoBust NoBust_sq NoBust_cb if  tradeTP!=., robust

replace  PartUSSanct=0

predict predNoUSSanct if e(sample)

replace  PartUSSanct=1

predict predPartUSSanct if e(sample)

gen effectsPartUSSanct= predNoUSSanct-predPartUSSanct

summ effectsPartUSSanct predNoUSSanct predPartUSSanct

clear





